# Contributor: Clayton Craft <clayton@craftyguy.net>
# Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=py3-lsp-jsonrpc
pkgver=1.0.0
pkgrel=1
pkgdesc="asynchronous JSON RPC server, fork of python-jsonrpc-server"
url="https://github.com/python-lsp/python-lsp-jsonrpc"
arch="noarch"
license="MIT"
depends="py3-ujson"
makedepends="py3-setuptools"
checkdepends="py3-pytest py3-mock"
source="$pkgname-$pkgver.tar.gz::https://github.com/python-lsp/python-lsp-jsonrpc/archive/v$pkgver.tar.gz"
builddir="$srcdir/python-lsp-jsonrpc-$pkgver"

build() {
	python3 setup.py build
}

check() {
	# test_writer_message broken with ujson:
	# https://github.com/python-lsp/python-lsp-jsonrpc/issues/6
	pytest -c test -k "not test_writer_bad_message"
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
390e6cb8adce2aa745446db4388d2dcb1fb42b8877c9c9402def813296e0e181d100035024f43eff8538265e388b452f624b90b455ec287eecd58d79828b54bd  py3-lsp-jsonrpc-1.0.0.tar.gz
"
